package demo.java.lang;

import java.io.IOException;

import org.junit.Test;

public class ExceptionDemo {

    @Test
    public void testToString() {
        Exception e = new IOException("hello ioException");
        System.out.println(e.toString());
        System.out.println("-------------------------");
        RuntimeException re = new RuntimeException(e);
        System.out.println(re.toString());
        System.out.println("-------------------------");
        e.printStackTrace();
    }
}
